package org.corey.dev.voxiverse.body;

import org.corey.dev.voxiverse.chunk.Chunk;

public class Body {
	public static final int WORLD_SIZE = 2;
	
	public static Chunk[][] Chunks;
	
	
	public void Render(){
		for (int x = 0; x < WORLD_SIZE; x++){
			for (int z = 0;z < WORLD_SIZE;z++){
				Chunks[x][z].Render();
			}
		}
	}
	
	public void Update(){
		for (int x = 0; x < WORLD_SIZE; x++){
			for (int z = 0;z < WORLD_SIZE;z++){
				Chunks[x][z].Update();
			}
		}
	}
	
	public Body(){
		Chunks = new Chunk[WORLD_SIZE][WORLD_SIZE];
		
		System.out.println("Building Chunks...");
		
		for (int x = 0; x < WORLD_SIZE; x++){
			for (int z = 0;z < WORLD_SIZE;z++){
				Chunks[x][z] = new Chunk(x*(Chunk.CHUNK_SIZE_X*Chunk.CUBE_LENGTH),0,z*(Chunk.CHUNK_SIZE_Z*Chunk.CUBE_LENGTH));
				System.out.println(x + " ," + z);
			}
		}
				
	}
}
